#include "DmxCommunicator.h"



DmxCommunicator::~DmxCommunicator()
{
    //dtor
}


ssize_t DmxCommunicator::read(const std::string& exceptionTip, void *buffer, const size_t length) noexcept {
//   	struct timeval tv;
//	tv.tv_sec = 1;
//	tv.tv_usec = 0;
//    fd_set readfds;
//	FD_ZERO(&readfds);
//	FD_SET(deviceFd, &readfds);
//	int nfds = select(deviceFd+1, &readfds, NULL, NULL, &tv);
//
//	if(nfds == 0)
//	{
//		printf("timeout!\r\n");
//		return -1;
//	}

    return ::read(deviceFd, buffer, length);
}



